package com.dingding.common.core.sms;

import com.dingding.common.core.sms.impl.ChuangLanSendMessageImpl;
import com.dingding.common.core.sms.impl.XuanWuSendMessageImpl;
import com.dingding.common.core.util.ToolUtil;

/**
 * 
 * @ClassName: ChuangLanSendMessageImpl
 * @Description: 创蓝发送短信实现
 * @author CHEHAUNBO
 * @date 2016年2月24日 下午4:46:02
 * 
 */
public class SendMessageFactory {

	/**
	 * 
	 * @Title: creatSendMessagePaltform 
	 * @Description: 创建发送短信平台对象
	 * @author YHQ 
	 * @return ISendMessage    返回类型
	 * 
	 */
	public static ISendMessage creatSendMessagePaltform() {

		// 声明发送短信对象
		ISendMessage sendMessage = null;
		// 获取配置文件中的参数
		String platForm = null;

		if (ToolUtil.isBlank(platForm) || platForm.equals("chuanglan")) { // 默认使用创蓝平台发送
			sendMessage = new ChuangLanSendMessageImpl();
		} else {
			sendMessage = new XuanWuSendMessageImpl(); // 玄武平台发送
		}

		return sendMessage;

	}

}
